package com.czxy.Demo18;

import java.util.Date;

public class RentalHouse {
    public double rent(Car car , int month){
        if (car instanceof Audi){
            return car.getPrice() * month;
        }
        if (car instanceof Alto){
            return car.getPrice() * month;
        }else{
            return 0;
        }
    }
}
